import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';

@Component({
  selector: 'app-font-icon',
  templateUrl: './font-icon.component.html',
  styleUrls: ['./font-icon.component.less'],
  changeDetection: ChangeDetectionStrategy.OnPush
})
export class FontIconComponent implements OnInit {
  @Input() public iconName: string;
  @Input() public size = 16;

  private prefix = 'icon-';

  constructor() { }

  ngOnInit(): void {
  }

  public get iconFontSize(): string {
    return `${this.size}px`;
  }

  public get fullName(): string {
    return `${this.prefix}${this.iconName}`;
  }

}
